//
//  ViewController.m
//  Extension
//
//  Created by 贾 on 16/10/12.
//  Copyright © 2016年 贾. All rights reserved.
//

#import "ViewController.h"
#import "UIGestureRecognizer+Block.h"
#import "UIImagePickerController+JJXExtension.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    [self.view addGestureRecognizer:[UITapGestureRecognizer JJX_gestureRecognizerWithActionBlock:^(id gestureRecognizer) {
        
        NSLog(@"执行点击手势操作");
    }]];
    
    
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    [picker showToViewController:self completeBlock:^(UIImagePickerController *picker, NSDictionary *info) {
        NSLog(@"选择图片或者照相完毕回调");
        [picker dismissViewControllerAnimated:YES completion:nil];
    } cancelBlock:^(UIImagePickerController *picker) {
       
        [picker dismissViewControllerAnimated:YES completion:nil];

    }];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
